using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;

namespace FE
{
    public class GameMath
    {
        public static bool InRangeOf(Point one, Point two, Point range)
        {
            return InRangeOf(one.X, one.Y, two.X, two.Y, range.X, range.Y);
        }
        public static bool InRangeOf(int x0, int y0, int x1, int y1, int rangeMin, int rangeMax)
        {
            int dy = y1 - y0;
            int dx = x1 - x0;
            int total = Math.Abs(dx) + Math.Abs(dy);
            return (rangeMin <= total) && (rangeMax >= total);
        }
    }
}
